<!DOCTYPE html>
<meta charset="utf-8">
<title></title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" type="text/css" href="https://www.layuicdn.com/layui-v2.5.5/css/layui.css" />
<style type="text/css">
.layui-table-body tr:nth-child(even) {
  background-color: #C7EDCC;
}

.layui-form-item {
  margin-bottom: -23px;
}
</style>
</head>

<body>
<div class="header layui-form">
  <div class="layui-form-item">
    <div class="layui-inline">
      <label class="layui-form-label">ID</label>
      <div class="layui-input-block">
        <input type="text" name="id" placeholder="请输入id" autocomplete="off" class="layui-input">
      </div>
    </div>

    <div class="layui-inline">
      <label class="layui-form-label">数据库地址</label>
      <div class="layui-input-block">
        <input type="text" name="like.url" placeholder="数据库地址" autocomplete="off" class="layui-input">
      </div>
    </div>

    <div class="layui-inline">
      <label class="layui-form-label">创建时间</label>
      <div class="layui-input-inline">
        <input type="text" autocomplete="off" class="layui-input layui-input-date" id="time1" name="start.create_time" placeholder="开始时间">
      </div>
      <div class="layui-form-mid layui-word-aux">-</div>
      <div class="layui-input-inline">
        <input type="text" autocomplete="off" class="layui-input layui-input-date" id="time2" name="end.create_time" placeholder="结束时间">
      </div>
    </div>

    <div class="layui-inline">
      <label class="layui-form-label">更新时间</label>
      <div class="layui-input-inline">
        <input type="text" autocomplete="off" class="layui-input layui-input-date" id="time3" name="start.update_time" placeholder="开始时间">
      </div>
      <div class="layui-form-mid layui-word-aux">-</div>
      <div class="layui-input-inline">
        <input type="text" autocomplete="off" class="layui-input layui-input-date" id="time4" name="end.update_time" placeholder="结束时间">
      </div>
    </div>

    <div class="layui-inline">
      <button class="layui-btn layuiadmin-btn-useradmin" lay-submit lay-filter="front-search">
          <i class="layui-icon layui-icon-search"></i>
        </button>
    </div>
  </div>
  <!--end layui-form-item-->
</div>
<!--end lay-card-head-->
<table id="data-table" lay-filter="data-table" class="layui-form layui-border-box layui-table-view"></table>

</body>
<script type="text/html" id="toolBar">
  <div class="layui-btn-container">
    <!--
    <button class="layui-btn layui-btn-sm layui-btn-tool layui-btn-danger" data-type="batchdel"><i class="layui-icon"></i>批量删除</button>
    <button class="layui-btn layui-btn-sm layui-btn-tool" data-type="add"><i class="layui-icon"></i>添加</button>
    <button class="layui-btn layui-btn-sm layui-btn-tool layui-btn-normal" data-type="addNewTab"><i class="layui-icon"></i>打开新界面添加</button>
    -->
    <button class="layui-btn layui-btn-sm layui-btn-tool" data-type="exportExcel"><i class="layui-icon"></i>导出Excel</button>
  </div>
</script>
<script type="text/html" id="operation-btns">
  <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
  <a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="del">删除</a>
  <a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="editNewTab">打开新页面编辑</a>

</script>

<script src="https://www.layuicdn.com/layui-v2.5.5/layui.js" type="text/javascript" charset="utf-8"></script>
<script src="http://libs.baidu.com/jquery/1.9.1/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../js/user.js" type="text/javascript" charset="utf-8"></script>
<script src="../../js/layui/ext/excel.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../js/common.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
var title = "数据库连接日志";
var tableName = "t_log_db_connected"
var uri = projectName + '/api/form';
document.title = title + '数据列表';
var formPageName = tableName + "_form.html";
var orderBy = 'create_time';
var isAsc = "false";
var idField = 'id';
var cols = [
  [{ "checkbox": true }, { "field": "id", "width": 50, "title": "id" },
    { "field": "url", "width": 400, "title": "数据库地址" },
    { "field": "result", "width": 100, "title": "连接结果" },
    { "field": "create_time", "width": 200, "title": "创建时间" },
    { "field": "remarks", "width": 100, "title": "备注" },
//  { "toolbar": "#operation-btns", "width": 250, "fixed": "right", "title": "操作" }
  ]
]
layui.use(['table', 'layer', 'form', 'laypage', 'laydate'], function() {
  var table = layui.table;
  var layer = layui.layer;
  var form = layui.form;
  var laypage = layui.laypage;
  var laydate = layui.laydate;
  //初始化时间组件
  layuiRenderTime(laydate);
  //渲染数据
  layuiTableRender(uri, title, cols, formPageName, table, layer, form, laypage);
});

function layuiRenderTime(laydate) {
  laydate.render({ elem: '#time1', type: 'datetime' });
  laydate.render({ elem: '#time2', type: 'datetime' });
  laydate.render({ elem: '#time3', type: 'datetime' });
  laydate.render({ elem: '#time4', type: 'datetime' });
}
</script>

</html>